package nobnak.study.opensles;


public class Recorder {
	public static native boolean createEngine();
	public static native void shutdown();
    public static native boolean createAudioRecorder();
    public static native boolean startRecording();
    public static native boolean stopRecording();
    public static native boolean setListener(RecorderListener l);
    
    /** Load jni .so on initialization */
    static {
    	System.loadLibrary("gnustl_shared");
    	System.loadLibrary("mp3lame");
        System.loadLibrary("recorder-jni");
    }
    
    public static interface RecorderListener {
    	public void read(byte[] pcm);
    	public void end();
    }
}
